package com.leps.nq.op.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.leps.nq.bi.vo.SimpleEntry;
import com.leps.nq.op.entity.OpWaterTest;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.leps.nq.op.vo.WaterTestQueryModel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 水样检测记录表 Mapper 接口
 * </p>
 *
 * @author hex
 * @since 2022-05-22
 */
@Mapper
public interface OpWaterTestMapper extends BaseMapper<OpWaterTest> {

    Page<OpWaterTest> selectByQueryModel(@Param("page") Page<OpWaterTest> page, @Param("queryModel") WaterTestQueryModel queryModel);

    int updateProperty(@Param("fieldName") String fieldName, @Param("value") Object value, @Param("whereFieldName") String whereFieldName, @Param("whereValue") Object whereValue);

    List<SimpleEntry<Double>> selectRecentIrons(int pumpId);

    List<SimpleEntry<Double>> selectRecentColonys(int pumpId);
}
